package com.sun.tetris.piece;

import com.sun.tetris.object.Piece;
import com.sun.tetris.object.Square;


import java.awt.*;
import java.util.ArrayList;
import java.util.List;

/**
 * @author 烛龙神
 * @Description TODO
 * @date 2021-07-27 21:33
 */
public class Piece0  extends Piece {
    //创建各个小方块，一个集合为一种变化
    public Piece0(Image image)
    {
        List<Square> squares = new ArrayList<Square>();
        squares.add(new Square(image,0,0));
        squares.add(new Square(image,0,image.getHeight(null)));
        squares.add(new Square(image,image.getWidth(null),0));
        squares.add(new Square(image.getWidth(null),image.getHeight(null)));
        //加入到变化中
        super.changes.add(squares);
        super.setSquares(squares);

    }
}
